package _04File类判断和获取功能;

import java.io.File;

public class Demo {

    public static void main(String[] args) {
//        public boolean isDirectory()	判断是否是文件夹,如果是返回true
        File file = new File("D:\\TestFile\\testMkdir");
        boolean directory = file.isDirectory();
        System.out.println("directory = " + directory);


//        public boolean isFile()	判断是否是文件,如果是返回true
        boolean isfile = file.isFile();
        System.out.println("isfile = " + isfile);
//        public boolean exists()	判断文件或文件夹是否存在，存在返回true
        File file2 = new File("D:\\TestFile\\testMkdir");
        boolean exists = file.exists();
        System.out.println("exists = " + exists);



    }
}
